using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AnQinFrameWorkAPI.Entity.Finance.Entity;

/// <summary>
///     财务用户模型
/// </summary>
[Table("FinanceUser")]
public class FinanceUserModel
{
    #region 字段

    /// <summary>
    ///     财务用户id
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     财务用户编码
    /// </summary>
    [MaxLength(50)]
    public string Code { get; set; }

    /// <summary>
    ///     财务用户名称
    /// </summary>
    [MaxLength(50)]
    public string Name { get; set; }

    /// <summary>
    ///     财务用户账号
    /// </summary>
    [MaxLength(50)]
    public string Account { get; set; }

    /// <summary>
    ///     财务用户密码
    /// </summary>
    [MaxLength(50)]
    public string Password { get; set; }

    /// <summary>
    ///     财务用户邮箱
    /// </summary>
    [MaxLength(50)]
    public string? Email { get; set; }

    /// <summary>
    ///     手机号
    /// </summary>
    [MaxLength(20)]
    public string? MobilePhone { get; set; }

    /// <summary>
    ///     创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    #endregion

    #region 关联

    /// <summary>
    ///     财务用户账户列表
    /// </summary>
    public virtual ICollection<FinanceUserAccount> FinanceUserAccounts { get; set; } = new List<FinanceUserAccount>();

    /// <summary>
    ///     财务用户分类列表
    /// </summary>
    public virtual ICollection<FinanceCategoryModel> FinanceCategories { get; set; } = new List<FinanceCategoryModel>();

    #endregion
}